# 决战紫禁之巅有两个人物，西门吹雪以及叶孤城
# 属性：
# name 玩家的名字
# blood 玩家血量
#
# 方法：
# tong() 捅对方一刀,对方掉血10滴
# kanren() 砍对方一刀，对方掉血15滴
# chiyao() 吃一颗药，补血10滴
# __str__ 打印玩家状态。
class Hero:
    def __init__(self,name,blood):
        self.name=name
        self.blood=blood
        pass
    def tong(self,diren):
        diren.blood-=10
        print("【{}】捅了【{}】一刀".format(self.name,diren.name))
        pass
    def kanren(self,diren):
        diren.blood-=15
        print("【{}】砍了【{}】一刀".format(self.name,diren.name))
        pass
    def chiyao(self):
        self.blood+=10
        print("【{}】吃了一颗药，回血10滴".format(self.name))
        pass
    def __str__(self):
        return "玩家【{}】的血量值为【{}】".format(self.name,self.blood)
    pass
ximenchuixue=Hero("西门吹雪",100)
yegucheng=Hero("叶孤城",110)
while True:
    print(ximenchuixue)
    print(yegucheng)
    print("=========================================")
    ximenchuixue.tong(yegucheng)
    print(ximenchuixue)
    print(yegucheng)
    print("=========================================")
    yegucheng.kanren(ximenchuixue)
    print(ximenchuixue)
    print(yegucheng)
    print("=========================================")
    ximenchuixue.chiyao()
    print(ximenchuixue)
    print(yegucheng)
    if ximenchuixue.blood<=0 or yegucheng.blood<=0:
        print("战斗结束")
        break



